package com.orchid.community.common.utils;

import java.io.Serializable;

public class  MsgResponse<T> implements Serializable {
    private Integer code;

    private String message;

    private T data;

    public MsgResponse(CodeEnum  codeEnum, T data) {
        this.message = codeEnum.getMessage();
        this.code = codeEnum.getCode();
        this.data = data;
    }

    public MsgResponse(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public MsgResponse() {

    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
